<template>
  <div>
    <div>
      <el-page-header @back="$router.go(-1)">
      </el-page-header>
    </div>

    <el-card class="box-card" style="margin: -30px 80px 0 80px;">
      <div slot="header" class="clearfix">
        <span>详情</span>
      </div>
      <div>
        <div class="center">

          <div class="title" style="text-align: center;">{{ articleDetails.title }}</div>
          <div class="author" style="text-align: center; margin-top: 15px;" >
            <span>作者：{{ articleDetails.author }}</span>&nbsp;&nbsp;&nbsp;
          <span>发表日期：{{ (articleDetails.publish_time) | fmtDate}}</span>&nbsp;&nbsp;&nbsp;
          </div>
          <!-- v-html个innerHTML类似 可以识别代码片段 -->
          <div class="text" v-html="articleDetails.content"></div>
        </div>
      </div>
    </el-card>
  </div>
</template>
<script>
export default {
  data() {
    return {
      articleDetails: {}
    }
  },
  created() {
    this.articleDetails = this.$route.query;
  },
}
</script>